Fn GetDotNetAssemblyByFile dllFileName = 
(
    local result
    DotNetAssembly = dotNetClass "System.Reflection.Assembly"

    tempFolder = SysInfo.TempDir
    sourceFileName = GetFilenameFile dllFileName
    tempPrefix = (GenClassID returnValue:true)[1] as string
    tempFileName = tempFolder + tempPrefix + sourceFileName + GetFilenameType dllFileName
    CopyFile dllFileName tempFileName
    result = DotNetAssembly.LoadFile tempFileName
    result
)

DotNetActivator = DotNetClass "System.Activator"
--根据实际路径填写
TestAssembly = GetDotNetAssemblyByFile @"C:\Program Files\Autodesk\3ds Max 2016\scripts\Startup\SocketBy3DMAX.dll"
TestClassType = TestAssembly.GetType("SocketTest.SocketServer")
TestClassObject = DotNetActivator.CreateInstance TestClassType
TestClassObject.InitSocket()